package com.cropdoctor.service;


import com.cropdoctor.common.Result;
import com.cropdoctor.model.dto.PwdFormDto;
import com.cropdoctor.model.po.SysUserPo;
import com.cropdoctor.model.vo.UserVO;
import com.cropdoctor.mybatisplus.BaseService;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

/**
 * Description: 【 用户表 Service接口 】
 */
public interface SysUserService extends BaseService<SysUserPo> {
    /**
     * 根据用户名查询用户
     *
     * @param userName
     * @return
     */
    SysUserPo selectByName(String userName);

    SysUserPo saveEntity(SysUserPo sysUserPo);

    SysUserPo getByOpenId(String openid);

    Result<UserVO> getUserInfo(HttpServletRequest request);

    Result<String> updateUserName(String userName);

    Result<String> updateAvatar(MultipartFile img);

    Result<String> updatePwd(PwdFormDto newPwd);

    Result<String> dailySign();

    Result<Integer> getSign();
}
